cmake_minimum_required(VERSION 3.0.0)
project(ufsCmake VERSION 0.1.0)

include(CTest)
enable_testing()

include_directories(dev dev/testDev os shell ufs ufs/lib ufs/sampleFS ufs/xFS )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -T ${CMAKE_SOURCE_DIR}/my.lds")

FILE (GLOB ALL_SOURCES "*.cpp" "*.c" "./dev/*.c" "./dev/testDev/*.c" "./os/*.c"  "./shell/*.c" "./ufs/*.c" "./ufs/lib/*.c" "./ufs/sampleFS/*.c" "./ufs/xFS/*.c")
FILE (GLOB ALL_INCLUDES "*.hpp" "*.h" "./dev/*.h" "./dev/testDev/*.h" "./os/*.h"  "./shell/*.h" "./ufs/*.h" "./ufs/lib/*.h" "./ufs/sampleFS/*.h" "./ufs/xFS/*.h")

SET (ALL_SRCS 
	 ${ALL_SOURCES}
	 ${ALL_INCLUDES}
)
 
# get_property(dirs DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
# message(">>> include_dirs=${dirs}") #打印一下目录情况
# aux_source_directory(. DIR_SRCS)
# message(">>> DIR_SRCS=${DIR_SRCS}") #打印一下目录情况

add_executable (ufsCmake ${ALL_SRCS})

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
